import request from '@/utils/request'

// 用户登录
export const swiper = () => {
  return request.get('/home/swiper')
}

export const getGroupList = () => {
  return request.get('/home/groups')
}

// 获取城市设备信息
export const cityIcontInfo = (id) => {
  return request.get('/houses/condition', {
    params: {
      id
    }
  })
}
// 图片上传
export const getImage = (data) => {
  return request.post('/houses/image', data)
}
// 发布房屋所需要的条件 /houses/params
export const getHouseCondition = () => {
  return request.get('/houses/params')
}
// /houses 根据条件查询房屋
export const postHouse = (data) => {
  return request.post('/user/houses', data)
}

// 小区 /area/community

export const getCoummuntiy = (name, id) => {
  return request.get('/area/community', {
    params: {
      name,
      id
    }
  })
}
//
export const getCityCommtiy = () => {
  return request.get('/houses/params')
}
// 发布房屋
export const postHouses = (data) => {
  return request.post('/user/houses', data)
}
export const MapCityId = (id) => {
  return request.get('/area/map', {
    params: {
      id
    }
  })
}
